<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="telephone=no,email=no" name="format-detection">
    <meta name="flexible" content="initial-dpr=1"/>
    <title>@yield('title')</title>
    <script src="{{ asset('/js/jquery-2.1.4.min.js') }}"></script>
    <script type="text/javascript" src="{{ asset('/addons/layer/layer.js')}}"></script>
    <script src="{{ asset('/addons/flatui/js/flat-ui.min.js') }}"></script>
    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
    @yield('js')
    <link href="{{ asset('/addons/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="{{asset('/wechat/css/header.css')}}">
    @yield('css')
    @yield('styles')
    <style>
        .container {
            max-width: 640px;
        }

        .head {
            max-width: 640px;
        }
    </style>
</head>
<body>
<!-- 头部 -->
@section('header')
    <div class="seat"></div>
    <div class="container">
        <div class="row">
            <div class="head" style="padding-right:5px; padding-left: 5px;">
                <div class="toHome pull-left" style="display:inline-block;font-family:'Microsoft YaHei'; margin-top: 12px;">
                    <a href="/">
                        <span class="glyphicon glyphicon-menu-left" style="font-size: 16px; color: #ffffff;line-height: 0.85;"></span>
                        <span style="font-size: 16px;  line-height: 0.85;color: #ffffff;">返回</span>
                    </a>
                </div>
                <div class="pull-right colll" style="font-family:'Microsoft YaHei'; margin-top: 13px;">
                    <span style="font-size: 16px;  line-height: 0.85;color: #ffffff;">分类</span>
                    <span style="font-size: 16px;  line-height: 0.85;color: #ffffff;" class="glyphicon glyphicon-triangle-top"></span>
                </div>
                <div class="">
                    <svg version="1.1" class="center-block" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
                         width="88px" height="36px" viewBox="0 0 489 200" enable-background="new 0 0 489 200" xml:space="preserve" style="margin-left: 40%;">
                         <g>
                             <g>
                                 <path fill="#FFFFFF" d="M58.088,127.888l1.175,15.191h-1.175c-0.783-2.263-1.736-4.208-2.861-5.833s-2.406-2.954-3.846-3.987
			c-1.439-1.032-3.031-1.791-4.774-2.274c-1.743-0.482-3.638-0.725-5.684-0.725c-3.436,0-6.48,0.731-9.132,2.191
			c-2.652,1.461-4.762,3.708-6.328,6.738c-0.859,1.671-1.516,3.564-1.97,5.685c-0.456,2.12-0.682,4.498-0.682,7.135
			c0,4.021,0.745,7.524,2.235,10.512c0.758,1.517,1.711,2.846,2.861,3.988c1.149,1.141,2.457,2.098,3.922,2.867
			c1.465,0.769,3.063,1.35,4.793,1.746c1.73,0.395,3.53,0.593,5.4,0.593c2.122,0,3.953-0.187,5.494-0.56
			c1.542-0.374,2.943-0.945,4.207-1.715c1.263-0.768,2.481-1.734,3.656-2.899s2.469-2.526,3.884-4.086l1.174,0.658
			c-1.288,1.978-2.678,3.691-4.168,5.142c-1.491,1.449-3.106,2.647-4.85,3.592c-1.743,0.945-3.632,1.643-5.666,2.093
			c-2.034,0.449-4.225,0.674-6.575,0.674c-8.539,0-15.133-2.744-19.78-8.237c-3.486-4.086-5.229-8.897-5.229-14.434
			c0-2.657,0.417-5.233,1.25-7.727c0.834-2.494,2.123-4.795,3.866-6.903c1.212-1.494,2.595-2.829,4.149-4.004
			c1.553-1.175,3.233-2.165,5.04-2.966c1.806-0.802,3.708-1.411,5.703-1.829c1.996-0.417,4.042-0.626,6.139-0.626
			c3.714,0,7.376,0.791,10.989,2.372c1.111,0.505,1.87,0.748,2.273,0.725c0.808,0,1.484-0.29,2.027-0.872s0.929-1.323,1.156-2.225
			H58.088z"/>
                                 <path fill="#FFFFFF" d="M87.077,172.374v1.219H65.061v-1.219h1.819c2.146,0,3.688-0.539,4.623-1.615
			c0.606-0.681,0.909-2.372,0.909-5.074v-28.867c0-1.054-0.025-1.91-0.076-2.57c-0.051-0.659-0.146-1.202-0.284-1.632
			c-0.139-0.428-0.341-0.762-0.606-1.005c-0.266-0.241-0.626-0.472-1.081-0.69c-1.111-0.529-2.273-0.793-3.485-0.793h-1.819v-1.219
			h22.016v1.219h-1.856c-2.122,0-3.651,0.539-4.586,1.615c-0.632,0.683-0.947,2.373-0.947,5.075v28.867
			c0,1.054,0.024,1.909,0.076,2.57c0.05,0.659,0.145,1.197,0.284,1.614c0.139,0.417,0.347,0.752,0.625,1.005
			s0.645,0.488,1.099,0.709c1.086,0.527,2.235,0.791,3.449,0.791H87.077z"/>
                                 <path fill="#FFFFFF" d="M120.727,173.593l-19.856-37.6v29.855c0,2.746,0.341,4.461,1.023,5.141
			c0.934,0.922,2.412,1.385,4.434,1.385h1.818v1.219H90.26v-1.219h1.819c2.173,0,3.714-0.571,4.623-1.715
			c0.556-0.68,0.834-2.283,0.834-4.811v-29.195c0-1.934-0.253-3.361-0.758-4.285c-0.178-0.329-0.417-0.631-0.72-0.906
			c-0.303-0.273-0.714-0.51-1.231-0.709c-0.519-0.195-1.144-0.351-1.876-0.459c-0.733-0.111-1.629-0.167-2.69-0.167v-1.219h14.551
			l18.643,34.963l18.341-34.963h14.551v1.219h-1.781c-2.198,0-3.752,0.573-4.661,1.715c-0.556,0.682-0.833,2.285-0.833,4.812v29.195
			c0,2.746,0.354,4.461,1.061,5.141c0.935,0.922,2.412,1.385,4.434,1.385h1.781v1.219H134.52v-1.219h1.819
			c2.172,0,3.713-0.571,4.623-1.715c0.555-0.68,0.833-2.283,0.833-4.811v-29.855l-19.818,37.6H120.727z"/>
                                 <path fill="#FFFFFF" d="M186.358,127.888c6.644,0,12.416,2.207,17.317,6.623c4.901,4.395,7.352,9.886,7.352,16.477
			c0,6.788-2.463,12.424-7.389,16.903c-4.926,4.483-10.888,6.723-17.886,6.723c-7.098,0-13.048-2.184-17.848-6.557
			c-4.799-4.371-7.199-10.028-7.199-16.971c0-7.097,2.778-12.885,8.336-17.365C173.866,129.831,179.638,127.888,186.358,127.888z
			 M185.638,130.294c-2.602,0-4.913,0.482-6.934,1.448c-2.022,0.968-3.721,2.346-5.098,4.137s-2.424,3.96-3.145,6.507
			c-0.72,2.549-1.08,5.406-1.08,8.569c0,3.141,0.354,6.019,1.061,8.633c0.707,2.615,1.749,4.86,3.126,6.739
			c1.377,1.878,3.076,3.339,5.097,4.383c2.02,1.043,4.358,1.564,7.009,1.564c2.375,0,4.58-0.396,6.613-1.186
			c2.033-0.791,3.795-2.016,5.286-3.676c1.491-1.657,2.659-3.772,3.506-6.343c0.846-2.57,1.269-5.635,1.269-9.192
			c0-3.405-0.347-6.442-1.042-9.112c-0.696-2.669-1.744-4.927-3.146-6.772c-1.402-1.845-3.145-3.256-5.229-4.234
			C190.849,130.782,188.417,130.294,185.638,130.294z"/>
                             </g>
                             <polygon fill="#FFFFFF" points="269.838,121.12 269.838,111.268 293.888,111.268 293.888,106.342 269.838,106.342 269.838,100.546
		297.075,100.546 297.075,97.069 269.838,97.069 269.838,87.797 256.799,87.797 256.799,97.069 230.719,97.069 230.719,100.546
		256.799,100.546 256.799,106.342 235.065,106.342 235.065,111.268 256.799,111.268 256.799,121.12 227.242,121.12 227.242,128.141
		299.685,128.141 299.685,121.12 	"/>
                             <g>
                                 <polygon fill="#FFFFFF" points="249.844,130.973 238.543,130.973 238.543,170.381 249.844,170.381 249.844,135.318
			275.054,135.318 275.054,133.29 249.844,133.29 		"/>
                                 <rect x="279.4" y="130.973" fill="#FFFFFF" width="11.88" height="39.408"/>
                             </g>
                             <rect x="323.155" y="87.797" fill="#FFFFFF" width="13.619" height="20.171"/>
                             <rect x="310.405" y="97.883" fill="#FFFFFF" width="64.617" height="2.663"/>
                             <polygon fill="#FFFFFF" points="359.375,116.193 359.375,155.603 359.375,166.613 329.964,166.613 329.964,120.541
		355.029,120.541 355.029,118.512 329.964,118.512 329.964,116.193 329.819,116.193 318.519,116.193 318.519,155.603
		318.519,170.381 329.964,170.381 329.964,168.353 359.375,168.353 359.375,170.381 371.256,170.381 371.256,155.603
		371.256,116.193 	"/>
                             <rect x="393.277" y="91.274" fill="#FFFFFF" width="13.33" height="79.106"/>
                             <rect x="404.579" y="94.461" fill="#FFFFFF" width="45.204" height="3.422"/>
                             <rect x="448.044" y="91.274" fill="#FFFFFF" width="13.039" height="79.106"/>
                             <rect x="416.459" y="105.183" fill="#FFFFFF" width="6.955" height="50.71"/>
                             <rect x="432.687" y="105.183" fill="#FFFFFF" width="6.954" height="50.71"/>
                             <path fill="#FFFFFF" d="M360.63,84.803c0,0,0.773,18.063-15.743,24.727c0,0,15.166,0.233,21.347-10.315
		C366.233,99.214,369.516,87.701,360.63,84.803z"/>
                             <path fill="#FFFFFF" d="M349.242,126.129c0,0-1.226,12.048-12.816,14.875c0,0,10.03,1.615,15.144-4.781
		C351.569,136.223,354.853,128.905,349.242,126.129z"/>
                             <path fill="#FFFFFF" d="M353.705,141.679c0,0-5.021,11.02-16.906,9.985c0,0,8.983,4.741,15.877,0.319
		C352.676,151.983,358.13,146.106,353.705,141.679z"/>
                             <path fill="#FFFFFF" d="M271.711,133.915c0,0-3.685,10.489-14.641,10.521c0,0,8.607,3.6,14.547-1.012
		C271.617,143.425,276.122,137.601,271.711,133.915z"/>
                             <path fill="#FFFFFF" d="M425.555,128.141c0,0-1.445,14.197-15.104,17.529c0,0,11.821,1.902,17.846-5.634
		C428.297,140.036,432.165,131.411,425.555,128.141z"/>
                             <path fill="#FFFFFF" d="M442.939,126.981c0,0-1.443,14.197-15.102,17.529c0,0,11.819,1.902,17.845-5.635
		C445.683,138.876,449.552,130.252,442.939,126.981z"/>
                             <path fill="#FFFFFF" d="M416.459,155.118c0,0-0.965,5.99-4.442,6.184c0,0,8.692,2.124,11.397-5.409L416.459,155.118z"/>
                             <path fill="#FFFFFF" d="M432.687,155.118c0,0-0.966,5.99-4.443,6.184c0,0,8.692,2.124,11.397-5.409L432.687,155.118z"/>
                             <path fill="#FFFFFF" d="M274.717,148.286c0,0-6.5,9.019-17.018,5.949c0,0,7.238,5.887,14.238,3.146
		C271.938,157.381,277.906,153.068,274.717,148.286z"/>
                             <path fill="#FFFFFF" d="M123.651,120.976c-14.923-2.173-26.663-16.228-26.663-16.228c18.396,35.497,34.197,20.284,33.907,19.414
		C127.852,120.541,123.651,120.976,123.651,120.976z"/>
                             <path fill="#FFFFFF" d="M186.126,109.052c-4.956-13.034-27.559-19.517-27.559-19.517c42.402-51.771,14.489-66.356,13.523-66.743
		c-0.633-0.237-1.269-0.421-1.906-0.58l0.014-0.031c-0.154-0.032-0.305-0.047-0.458-0.076c-1.062-0.235-2.129-0.375-3.198-0.414
		c-20.156-1.452-33.566,19.176-33.566,19.176h0.003c-16.042,19.561-15.742,45.096-15.742,45.096l0.005,0.03
		c-0.548,8.587,0.743,15.336,1.808,19.227c0.1,0.559,0.205,1.129,0.315,1.713c-0.914-0.536-4.592-2.746-8.452-5.809
		c-1.107-0.921-2.181-1.835-3.216-2.744c-0.398-0.364-0.715-0.644-0.963-0.854C81.585,75.095,77.863,56.725,78.203,47.3
		c0.055-0.226,0.083-0.614,0.073-1.219c0-0.034,0.003-0.061,0.003-0.095c0.076-0.935,0.19-1.757,0.32-2.465
		c0.916-3.054,3.507-3.446,3.981-3.492c15.285-0.901,36.289,21.11,36.289,21.11C103.657,39.841,90.618,34.48,90.618,34.48
		c-18.69-8.403-19.85,4.636-20.139,5.516c-3.477,51.588,53.172,71.272,53.172,71.272c-1.973-3.288-2.507-6.51-2.643-7.664
		c-0.681-7.169,0.084-14.489,0.707-18.989l-0.001,0.001c0.001-0.01,0.003-0.02,0.005-0.029c0.335-2.417,0.628-4.028,0.628-4.324
		c0.341-1.305,0.692-2.568,1.05-3.794c6.355-25.468,19.922-36.468,19.922-36.468l0.005,0.003
		c12.852-12.463,22.141-9.825,24.389-8.895c1.051,0.473,1.938,1.045,2.645,1.617c0.549,0.521,2.398,2.628,3.17,7.766
		c0.101,0.728,0.19,1.456,0.249,2.183c0.002,0.019,0.003,0.033,0.006,0.053c2.008,25.075-19.995,48.982-19.995,48.982
		s20.235,3.333,26.61,16.662c0.044,0.352,1.232,1.885,0.725,3.684c0,0-2.367,15.73-53.076,3.56
		c33.661,19.27,54.12,3.891,54.12,3.891l0,0.001C187.956,114.797,186.405,109.803,186.126,109.052z"/>
                         </g>
                    </svg>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="clearfix" style="position: fixed;width: 100%;">

                <div class="hiddenlist" style="display: none;">
                    <ul>
                        <li><a onclick="showul(1);">计算机/互联网/通信</a></li>
                        <li><a onclick="showul(3);">会计/金融/银行/保险</a></li>
                        <li><a onclick="showul(112);">人力资源/行政</a></li>
                        <li><a onclick="showul(2);">贸易/物流/交通/销售</a></li>
                        <li><a onclick="showul(4);">电子/生产/制造</a></li>
                        <li><a onclick="showul(5);">化工/制药/医疗</a></li>
                        <li><a onclick="showul(6);">建筑/工程/装潢</a></li>
                        {{--<li><a href="" onclick="showul(8);">艺术/传媒/其它</a></li>--}}
                    </ul>
                </div>


                @foreach($threearr as $k=>$tharr)
                    <div class="hid2" style="display: none;" id="{{"ul".$k}}">
                        <ul>
                            @foreach($tharr as $k2=>$sarr)
                                @foreach($sarr as $k3=>$onearr)
                                    <li>
                                        <a class="addtest" style="cursor:pointer;" data-url="{{$k3}}" @if(empty($authuser)) data-ur="un" @else data-ur="{{$authuser->id}}" @endif>{{$onearr}}</a>
                                    </li>
                                @endforeach
                            @endforeach
                        </ul>
                    </div>
                @endforeach

            </div>
        </div>
    </div>

    <div class="modal fade" id="examModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content selExam" style="font-size: 12px;font-family: inherit;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-top: -12px;">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="resumeModalLabel" style="text-align: center;">选择试卷</h4>
                </div>
                <div class="modal-body">
                    <div id="examSelect" style="text-align: center;">

                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $('.colll').click(function () {
                    if ($('.colll .glyphicon').hasClass('glyphicon-triangle-bottom')) {
                        $('.hiddenlist').hide(400, function () {
                            $('.colll .glyphicon-triangle-bottom').removeClass("glyphicon-triangle-bottom").addClass("glyphicon-triangle-top");
                            $('.hid2').css('display', 'none');
                        })
                    } else {
                        $('.hiddenlist').show(400, function () {
                            $('.colll .glyphicon-triangle-top').removeClass("glyphicon-triangle-top").addClass("glyphicon-triangle-bottom");
                        })
                    }

                }
        );

        function showul(kid) {
            $('.hid2').css('display', 'none');
            $("#ul" + kid).css('display', 'block');

        }

        $(document).on('click', '.addtest', function () {
            var kid = $(this).attr('data-url');
            //alert(resume_id);
            var userid = $(this).attr('data-ur');
            if (userid == '' || userid == 'un') {
                var prev = encodeURIComponent(window.location.pathname);
                window.location.href = '/guestlogin?rurl='+prev;
                return false;
            }
            $.ajax({
                'url': '/tests/exam-list?kid=' + kid,
                'type': 'GET',
                error: function (data) {
                    layer.open({title: '系统提示', content: '该岗位还没有试卷'});
                },
                success: function (response) {
                    var result = response.data;
                    var examlist_html = '';

                    //examlist_html += '<option value="0">选择试卷</option>';
                    if (response.data) {
                        examlist_html += '<select style="width:90px; height:29px;" name="examlist" id="examlist">';
                        $.each(result, function (key, exp) {
                            examlist_html += ' <option value="' + key + '">' + exp + '</option>';
                        })
                        examlist_html += '</select>'
                                + '<button style="width:90px; height:30px; margin-left: 10px;" type="submmit" onclick="selex();">确认</button>';
                    } else {
                        //examlist_html += '</select>';
                        examlist_html += '<div class="no_exam">抱歉，该岗位还没有相关测试卷</div>';
                    }
                    $('#examSelect').html(examlist_html);
                    $('#examModal').modal();
                }
            });
        });

        function selex() {
            var des = $("#examlist").val();
            var url = "/tests/system-start?eid=" + des;
            window.location.href = url;
        }
    </script>
    @show
            <!-- 内容 -->
    @yield('content')
            <!-- 底部 -->
</body>
</html>
